package com.fen.java.web.listener.demo01;

import javax.swing.*;
import java.awt.*;

/**
 * @author : lrf
 * @description :
 * @tip :
 * @date : 2019/3/24
 */
public class ListenerDemo001 {

    public static void main(String[] args) {

        JFrame jFrame = new JFrame();

        jFrame.setSize(300, 200);
        jFrame.setLocation(500, 300);
        jFrame.setLayout(new FlowLayout());
        jFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

        JButton button = new JButton("确定");
        jFrame.add(button);

        button.addActionListener(actionEvent -> System.out.println("actionEvent = " + actionEvent));


        jFrame.setVisible(true);

    }
}
